<?php
class Prop extends CI_Model {
    function __construct()
    {
        parent::__construct();
        
        $this->load->database();
    }
	public function Insert($p)
	{
		$sql = "INSERT INTO `item_cats`(`cid`,`parent_id`,`name`,`path`,`order_index`,`created`,`modified`)".
			" VALUES(".$c->cid.", ".$c->parent_cid.", '".addslashes($cname)."', '".
			$c->parent_cid.",".$c->cid."',".$c->order_index.",".time().", ".time().");";
					
		$this->db->query($sql);
	}
//	public function GetList($params)
//	{
//		$where = " WHERE 1=1";
//		if(isset($params['page']) AND isset($params['pagesize']))
//		{
//			$where .= " LIMIT ".($params['page']-1)*$params['pagesize'].",".$params['pagesize'];
//		}
//		$sql = "SELECT * FROM `item_cats`".$where;
//		
//		return $this->db->query($sql)->result_array();
//	}
}